package com.mark.web.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class HelloWorldController {

    @RequestMapping("index")
    public String index( Model model) {
        return "index";
    }

    @RequestMapping("json")
    @ResponseBody
    public String json(@RequestParam Integer i) {
        System.out.println("获取到的参数："+i);
        return "success";
    }
}
